package com.ea.mapper;

import com.ea.domain.entity.LogisticInfo;
import com.ea.domain.query.LogisticQueryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 物流信息表 Mapper 接口
 * </p>
 *
 * @author 电器商城
 * @since 2022-11-29
 */
@Mapper
public interface LogisticInfoMapper {

    /**
     * 更新物流单信息
     * @param logisticInfo
     */
    void updateLogisticInfo(LogisticInfo logisticInfo);

    /**
     * 批量添加物流信息
     * @param infoList
     */
    void insertLogisticInfoBatch(List<LogisticInfo> infoList);

    /**
     * 更新物流单状态
     * @param logisticId
     * @param status
     */
    void updateLogisticStatus(@Param("logisticId") Long logisticId,@Param("status") Integer status);

    /**
     * 根据物流id查询物流单信息
     * @param logisticId
     * @return
     */
    LogisticInfo selectOneByLogisticId(Long logisticId);

    /**
     * 根据条件批量查询
     * @param queryDTO
     * @return
     */
    List<LogisticInfo> selectAllByCondition(LogisticQueryDTO queryDTO);

    /**
     * 删除物流单
     * @param logisticId
     */
    void deleteLogisticInfo(Long logisticId);
}
